package com.yideb.demo;

import com.yideb.core.rest.RetData;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("demo")
public class DemoController {

    @Resource
    private SingleSessionLinstenerImpl singleSessionLinstener;
    @Resource
    private DemoService demoService;

    @RequestMapping("list")
    public RetData list() {
        System.out.println(singleSessionLinstener);
        return RetData.success("成功");
    }

    @RequestMapping("listUser")
    public List<String> listUser(String userId) {
        return demoService.listUser(userId);
    }
}
